package my.bean;

import java.util.Date;

public class Credits {
	private int id;
	private Customer customer;
	private int type;
	private double value;
	private Date time;
	
	public Credits(int id, Customer customer, int type, double value, Date time) {
		super();
		this.id = id;
		this.customer = customer;
		this.type = type;
		this.value = value;
		this.time = time;
	}

	public Credits(Customer customer, int type, double value, Date time) {
		super();
		this.customer = customer;
		this.type = type;
		this.value = value;
		this.time = time;
	}

	public Credits(int id, int cid, int type, double value, Date time) {
		super();
		this.id = id;
		this.customer = new Customer();
		this.customer.setUserId(cid);
		this.type = type;
		this.value = value;
		this.time = time;
	}

	public Credits(int cid, int type, double value, Date time) {
		super();
		this.customer = new Customer();
		this.customer.setUserId(cid);
		this.type = type;
		this.value = value;
		this.time = time;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public Credits() {
		super();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getCid() {
		return this.customer.getUserId();
	}

	public void setCid(int cid) {
		this.customer.setUserId(id);
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

}
